/*
 * @Author: whr2349
 * @Date: 2021-03-04 16:02:19
 * @LastEditors: whr2349
 * @LastEditTime: 2021-03-09 15:30:40
 * @Description: file content
 * @FilePath: \webadmin\src\router\index.js
 */
import {createRouter, createWebHashHistory} from 'vue-router'

const routes = [
    {
        path: '/',
        redirect: '/index/sys/user',
    },
    {
        path: '/index',
        name: 'index',
        component: () => import(/* webpackChunkName: "about" */ '../views/index.vue'),
        meta: {title: "首页"},
        redirect: '/index/sys/user',
        children: [
            {
                path: 'sys',
                name: 'sys',
                component: () => import(/* webpackChunkName: "about" */ '../views/sys/index.vue'),
                meta: {title: "系统设置"},
                children: [
                    {
                        path: 'user',
                        name: 'user',
                        component: () => import(/* webpackChunkName: "about" */ '../views/sys/user.vue'),
                        meta: {title: "用户管理"}
                    },
                    {
                        path: 'organization',
                        name: 'organization',
                        component: () => import(/* webpackChunkName: "about" */ '../views/sys/organization.vue'),
                        meta: {title: "组织管理"}
                    },
                ]
            },
            {
                path: 'workflow',
                name: 'workflow',
                component: () => import(/* webpackChunkName: "about" */ '../views/workflow/index'),
                // redirect:"workflow/list",
                meta: {title: "流程管理"},
                children: [
                    {
                        path: 'list',
                        name: 'flowlist',
                        component: () => import(/* webpackChunkName: "about" */ '../views/workflow/list.vue'),
                        meta: {title: "流程列表"}
                    },
                ]
            },
            {
                path: 'pump/index',
                name: 'pump',
                component: () => import(/* webpackChunkName: "about" */ '../views/pump/index.vue'),
                meta: {title: "泵站检测"}
            },

        ]
    },


]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
